import request from '@/utils/request'
import Vue from 'vue'

// 每日业绩报表列表
export const queryOrderReportDaily = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.index,
        method: 'post',
        data,
    })
}
export const queryOrderReportDay = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.RealTimeTodayInfo,
        method: 'post',
        data,
    })
}
// 每日业绩报表列表
export const orderReportDailyEdit = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.edit,
        method: 'post',
        data,
    })
}
// 每日业绩报表详情明细
export const queryOrderReportDailyInfo = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.info,
        method: 'post',
        data,
    })
}
export const queryOrderReportDailySpuInfo = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.spuInfo,
        method: 'post',
        data,
    })
}
// 每日业绩报表导出
export const exportOrderReportDaily = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.export,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
export const queryAdvertisingRealList = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.advertising_real_list,
        method: 'post',
        data,
    })
}
export const getOrderReportDailyRoleId = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.getOrderReportDailyRoleId,
        method: 'post',
        data,
    })
}
// 每日SKU报表列表
export const queryOrderReportSku = data => {
    return request({
        url: Vue.prototype.$api.orderReportSku.index,
        method: 'post',
        data,
    })
}
// 每日SKU报表信息
export const queryOrderReportSkuInfo = data => {
    return request({
        url: Vue.prototype.$api.orderReportSku.info,
        method: 'post',
        data,
    })
}
// 每日SKU报表导出
export const exportOrderReportSku = data => {
    return request({
        url: Vue.prototype.$api.orderReportSku.export,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
export const queryPaymentTools = data => {
    return request({
        url: Vue.prototype.$api.PaymentTools.index,
        method: 'post',
        data,
    })
}

export const exportSkuInfo = data => {
    return request({
        url: Vue.prototype.$api.orderReportSku.exportSkuInfo,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
export const getSpuSalesRanking = data => {
    return request({
        url: Vue.prototype.$api.orderReportSku.getSpuSalesRanking,
        method: 'post',
        data,
    })
}

// 登陆页面访问量
export const getReportVisitList = data => {
    return request({
        url: Vue.prototype.$api.reporting.getList,
        method: 'post',
        data,
    })
}
// editRoleId
export const editRoleId = data => {
    return request({
        url: Vue.prototype.$api.reporting.editRoleId,
        method: 'post',
        data,
    })
}
// get_page_type
export const get_page_type = () => {
    return request({
        url: Vue.prototype.$api.reporting.get_page_type,
        method: 'post',
    })
}
// get_page_path
export const get_page_path = () => {
    return request({
        url: Vue.prototype.$api.reporting.get_page_path,
        method: 'post',
    })
}
// add_page_path
export const add_page_path = data => {
    return request({
        url: Vue.prototype.$api.reporting.add_page_path,
        method: 'post',
        data,
    })
}
// 按登录页面导出接口
export const exportReportVisitList = data => {
    return request({
        url: Vue.prototype.$api.reporting.export,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
// 查询历史列表接口
export const getReportHistoryList = data => {
    return request({
        url: Vue.prototype.$api.reporting.getHistoryList,
        method: 'post',
        data,
    })
}
// 编辑历史列表接口
export const editHistoryList = data => {
    return request({
        url: Vue.prototype.$api.reporting.editHistoryList,
        method: 'post',
        data,
    })
}

// 导出历史列表接口
export const exportReportHistoryList = data => {
    return request({
        url: Vue.prototype.$api.reporting.exportHistoryList,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
// 编辑历史列表接口
export const getRoleId = () => {
    return request({
        url: Vue.prototype.$api.reporting.getRoleId,
        method: 'post',
    })
}



// 登陆页面访问量
export const getReportVisitPathList = data => {
    return request({
        url: Vue.prototype.$api.reporting.getPathList,
        method: 'post',
        data,
    })
}
// 按登录页面导出接口
export const exportReportVisitPathList = data => {
    return request({
        url: Vue.prototype.$api.reporting.exportPath,
        method: 'post',
        data,
        responseType: 'blob',
    })
}

export const exportReportDay = data => {
    return request({
        url: Vue.prototype.$api.orderReportDaily.exportReportDay,
        method: 'post',
        data,
        responseType: 'blob',
    })
}


export const queryOutStockInfo = data => {
    return request({
        url: Vue.prototype.$api.queryOutStockInfo.Outinfo,
        method: 'post',
        data,
    })
}

export const queryStockInfo = data => {
    return request({
        url: Vue.prototype.$api.queryOutStockInfo.info,
        method: 'post',
        data,
    })
}


export const exportNeedInfo = data => {
    return request({
        url: Vue.prototype.$api.orderReportSku.exportNeedInfo,
        method: 'post',
        data,
        responseType: 'blob',
    })
}